program task_115d;

{$mode objfpc}{$H+}

uses
  math,
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { you can add units after this };

var
  n, k: integer;
  s: real;
begin
  writeln('task 115d');
  writeln('enter n:');
  readln(n);

  s := 0;
  for k := 1 to n do
  begin
    s := s + power(-1, k+1)/k*(k+1);
  end;

  writeln('sum for ', n, ' is ', s:3:3);
  readln;
end.

